{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## pandas 基础知识\n",
    "\n",
    "### 运行环境:\n",
    "\n",
    "* python3.6\n",
    "* anaconda jupyter notebook 启动 idle\n",
    "* 学习资料 \n",
    "    > * 网易云课堂 Pandas玩转Excel-Timothy\n",
    "    > * 利用python进行数据分析 第二版\n",
    "    > * Python数据分析与数据化运营 买实体书？\n",
    "\n",
    "### 核心概念:\n",
    "* Serise、DataFrame 核心数据结构\n",
    "> Serise：一位数组；df.index 索引 、df.values 值\n",
    "> DataFrame：二位数组或者修改索引多维数组；df.index、df.columns 、df.values值\n",
    "* index、columns 数据的索引 去除就是numpy ndrray结构\n",
    "* df.values 就是去掉 index 与 column 的二维ndarray、一维就是 series ndarray\n",
    "* axis轴: 上下0、index轴；左右1、columns轴。表示的是程序迭代的方向\n",
    "    > * 特例 df.drop() 默认 axis = 0 查找按照 0轴，所以舍弃的是index row\n",
    "    > * df[\"A\"].sum() A列 axis = 0 查找按照 0轴，所以按照A列求和\n",
    "\n",
    "### pandas 基础操作:\n",
    "\n",
    "#### 数据IO操作-读取\n",
    "```\n",
    "df = pd.read_csv(path,encoding = 'gb18030',header = 1,engine ='python')\n",
    "# names = list 如果读取的没有columns 可以用list添加 columns\n",
    "# index_col 指定 数据某一列 为 表格index\n",
    "\n",
    "df = pd.read_excel(path,skiprows=3,header=2,usecols='C:F'\\\n",
    "                  ,dtype={'ID':object,'InStore':str,'Date':str},index_col='ID')\n",
    "# sheet_name=‘sheet1’ 把Excel表中读取sheet1 或者sheet2\n",
    "\n",
    "df = pd.read_table(path,sep=\"\\t\")\n",
    "# 从文件、URL读取指定分隔好的数据、默认制表符\n",
    "```\n",
    "\n",
    "#### 数据IO操作-存储\n",
    "```\n",
    "df.to_excel(path,index = False,encoding = \"gb18030\")\n",
    "df.to_csv(path,index = False,encoding = \"gb18030\")\n",
    "```\n",
    "\n",
    "#### 数据查看\n",
    "```\n",
    "df.info()  # 查看每列数据类型\n",
    "df.shape  # (rows,columns)\n",
    "df.index  # 查看行 Serise\n",
    "df.columns  # 查看列 Serise\n",
    "df.head()  # 前5行\n",
    "df.tail()  # 后5行\n",
    "df.describe()  # 查看基础统计值 计数值、均值、标准差、最下最大值、1/4值\n",
    "df.isnull().sum()  # 查看 每列空数值\n",
    "df.isnull().any()  # 判断是否有空值\n",
    "df[\"Names\"].unique()  # 查看Series列唯一值\n",
    "```\n",
    "\n",
    "#### 数据定位\n",
    "\n",
    "```\n",
    "df[\"A\"]  # 选择column是A列 Serise\n",
    "df.loc[\"2019-11-11\"]  # 选择index是2019-11-11 row\n",
    "df.loc[:,['A','C']]  # 选择所有rows 和 A列、C列\n",
    "df.iloc[[1,5,6]:[0,3]  # 选择2、6、7row；1、4列\n",
    "df.iloc[::2,:-2]  # 偶数row保存去除最后两列，切片操作\n",
    "\n",
    "df[df['销售额'].isin([55,33,11])]  # 显示 销售额 列中是55、33、11\n",
    "df[~df.a.isin(df.b)]  # ~ 反选 a列不在b列的数据显示\n",
    "df[(df.A>0)&(df.B<15)]  # 显示A列大于0且B列小于15的数据 或者用 | 记得()\n",
    "df[df.发票类型.str.contains('销售')]  # 显示 发票类型 列 str包含销售char的数据\n",
    "\n",
    "\n",
    "# 优雅的query语法直接显示数据\n",
    "# and、or、in、not in、==、!=、@变量、not bools、（）优先级\n",
    "# https://blog.csdn.net/AlanGuoo/article/details/88874742\n",
    "df.query('c == [1, 2]')\n",
    "df.query('c != [1, 2]')\n",
    "df.query('[1, 2] in c')\n",
    "df.query('a in b or c < d')\n",
    "df.query('A < @Cmean and B < @Cmean')  # @Cmean 变量\n",
    "df.query('a not in b')  # a列不在b列的 等价与上面 ~\n",
    "```\n",
    "#### 数据校验、过滤\n",
    "\n",
    "```\n",
    "def score_valication(row):\n",
    "    try:\n",
    "        assert 0 <= row.Score <= 100\n",
    "    except:\n",
    "        print(f'#{row.ID}\\tstudent {row.Name} has an invalid score {row.Score}')\n",
    "students = pd.read_excel('C:/Temp/Students.xlsx')\n",
    "students.apply(score_valication, axis=1)  # axis 按照row校验\n",
    "\n",
    "def age_range(x):\n",
    "    return 20<=x<=36\n",
    "def score_range(y):\n",
    "    return 80<=y<=100\n",
    "df1=df.loc[df['Age'].apply(age_range)].loc[df['Score'].apply(score_range)]\n",
    "df = df['数量'].apply(lambda x : -x)  #数量列全部负值\n",
    "```\n",
    "\n",
    "#### 数据基础操作-EXCEL\n",
    "\n",
    "##### indexs、columns操作\n",
    "```\n",
    "df.index.values.tolist() # 获得index先变成array数据格式再转换list操作\n",
    "\n",
    "df.index = list  # df.index属性赋值操作\n",
    "df.reindex(columns = new_columns_list,fill_value = \"这是空值\")  # list中如果原来没有这列以Nan填空\n",
    "df.loc[index_list,new_columns_list]  # 和上面一样等价用loc完成\n",
    "\n",
    "df.drop([\"A列\",\"B列\"],axis = 1 ,inplace = True)  # 删除两列在原数据上修改\n",
    "\n",
    "df.reset_index(drop=True)  # 重新设置index且放弃旧index\n",
    "df.set_index(['ID','日期']，inplace=True,drop=True)  # 设置Mulitindex 原来index去\n",
    "df.rename(columns = {df.columns[1]:'size'},inplace=True)  # 修改columns名称 传入字典\n",
    "```\n",
    "\n",
    "#####  变更数据类型\n",
    "```\n",
    "df['开票时间'] = pd.to_datetime(df.开票时间)\n",
    "df.数量 = df.数量.astype('int')  # 需要赋值修改\n",
    "```\n",
    "\n",
    "##### 单元格填空\n",
    "```\n",
    "df['ID'].at[0] = 100  #Serise 后 at\n",
    "df.at[0,'ID'] = 100 #DateFrame 后 at\n",
    "df.loc[0,'ID'] = 100 \n",
    "\n",
    "for i in books.index:\n",
    "    books['ID'].at[i]=i+1  # ID 列 index 第一行到最后一行 1、2、3...赋值\n",
    "    books['InStore'].at[i]='Yes'if i%2==0 else 'No'  # InStore列如果是偶数行Yes、奇数行No\n",
    "```\n",
    "\n",
    "#####  排序\n",
    "\n",
    "```\n",
    "df.sort_values(by=['Worthy', 'Price'], ascending=[True, False], inplace=True)\n",
    "# by 排序的columns\n",
    "# ascending True 从小到大\n",
    "```\n",
    "\n",
    "#####  多表联合VLOOKUP\n",
    "\n",
    "```\n",
    "table = df1.merge(df2,how='left',on='ID').fillna('没找到')\n",
    "table.Score = table.Score.astype(int)#Score列变成整数\n",
    "# how=’left‘ 表示依 df1 基础 保留所有df1列信息。默认inner参数\n",
    "# on=’ID‘ df1与df2都有ID列 前提两张表都有ID列，没有用 left_on与right_on\n",
    "#.fillna() 表示 在df1中df2没有的数据填下’没找到‘\n",
    "# merge 不能默认指定index列 必须 on指定\n",
    "students = pd.read_excel('C:/Temp/Student_score.xlsx', sheet_name='Students', index_col='ID')\n",
    "scores = pd.read_excel('C:/Temp/Student_score.xlsx', sheet_name='Scores', index_col='ID')\n",
    "table = students.join(scores, how='left').fillna(0)\n",
    "table.Score = table.Score.astype(int)\n",
    "#join 必须指定index_col一样，也有on参数\n",
    "```\n",
    "\n",
    "#####  去除重复数据\n",
    "\n",
    "```\n",
    "students = pd.read_excel('C:/Temp/Students_Duplicates.xlsx')\n",
    "# 找出重复数据行index定位\n",
    "dupe = students.duplicated(subset='Name')  # dupe是一个serises index与students 一样是布尔True与Flase\n",
    "dupe = dupe[dupe == True]  # dupe = dupe[dupe]，拿到dupe 重复数据的index True\n",
    "print(students.iloc[dupe.index])  # 用iloc 定位 index\n",
    "# 删除重复数据\n",
    "students.drop_duplicates(subset='Name', inplace=True, keep='last')\n",
    "# subset 需要列重复数据 如果多列 ['Name','ID']\n",
    "# keep last 意思保留后面的数据，默认first 保留前面数据\n",
    "```\n",
    "\n",
    "#####  分类汇总\n",
    "\n",
    "```\n",
    "# 方法1:\n",
    "import numpy as np\n",
    "from datetime import date\n",
    "orders = pd.read_excel('C:/Temp/Orders.xlsx', dtype={'Date': date})  # 让Date列变成日期类型？始终有问题\n",
    "orders['Year'] = pd.DatetimeIndex(orders.Date).year\n",
    "# 新增Year列 让Date 2019/5-31 在Year列中显示年份year\n",
    "pt1 = orders.pivot_table(index='Category', columns='Year', values='Total', aggfunc=np.sum)\n",
    "# 生成数据透视表 row是Category，columns是Year的种类，求值是Total列的数值，目的是aggfunc 求和\n",
    "\n",
    "# 方法2：\n",
    "groups = orders.groupby(['Category', 'Year'])\n",
    "#根据Category、Year列分组\n",
    "s = groups['Total'].sum()\n",
    "# Total列求和\n",
    "c = groups['ID'].count()\n",
    "# ID列求数量\n",
    "pt2 = pd.DataFrame({'Sum': s, 'Count': c})\n",
    "# s、c 两个DataFrame 按照列Sum 与 Count 再合并成一个新DateFrame\n",
    "```\n",
    "\n",
    "##### 多表合并追加\n",
    "\n",
    "```\n",
    "pd.concat((data1,data2),axis = 1) # 水平合并\n",
    "df.append(df1).reset_index(drop = True)  # 垂直合并\n",
    "```\n",
    "\n",
    "##### 替换、合并、分列 利用str方法\n",
    "\n",
    "```\n",
    "# 替换\n",
    "df.replace(to_replace='?',value=np.nan)#to_replace替换前的值，value替换的值\n",
    "\n",
    "# 合并\n",
    "df['小时分钟']=df['小时'].str.cat(df.['分钟']，sep='-')\n",
    "\n",
    "# 分列\n",
    "time=df.创建时间.str.split(expand=True)\n",
    "# str.split()空的表示默认空格分\n",
    "# expand list分为全咧\n",
    "# columns 0 1\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#11、缺失值处理\n",
    "#判断是否有空值nan\n",
    "pd.isnull(df)#布尔索引 nan返回 True\n",
    "pd.isnull(df).any() #每个字段是否有缺失值\n",
    "np.any(pd.isnull(df)#返回True 就存在空值\n",
    "\n",
    "pd.notnull(df)\n",
    "np.all(pd.notnull(df)#返回False 就是存在空值\n",
    "pd.notnull(df).all()\n",
    "#处理两种方法：删除与替换\n",
    "df.dropna()#删除存在缺失值，不会修改原来数据 返回 按照row删除\n",
    "df.fillna(value,inplace=True)#value修改原来数据\n",
    "\n",
    "#判断有特殊符号缺失值 比如 ？\n",
    "df.replace(to_replace='?',value=np.nan)#to_replace替换前的值，value替换的值\n",
    "#替换成空值nan后就可以删除替换了\n",
    "\n",
    "#四、数据统计\n",
    "\n",
    "#行列求和、求平均\n",
    "students = pd.read_excel('C:/Temp/Students.xlsx', index_col='ID')\n",
    "\n",
    "row_sum = students[['Test_1', 'Test_2', 'Test_3']].sum(axis=1)\n",
    "row_mean = students[['Test_1', 'Test_2', 'Test_3']].mean(axis=1)\n",
    "\n",
    "students['Total'] = row_sum\n",
    "students['Average'] = row_mean\n",
    "\n",
    "col_mean = students[['Test_1', 'Test_2', 'Test_3', 'Total', 'Average']].mean()\n",
    "col_mean['Name'] = 'Summary'\n",
    "students = students.append(col_mean, ignore_index=True)\n",
    "\n",
    "#行操作集锦\n",
    "page_001 = pd.read_excel('C:/Temp/Students.xlsx', sheet_name='Page_001')\n",
    "page_002 = pd.read_excel('C:/Temp/Students.xlsx', sheet_name='Page_002')\n",
    "# 追加已有：append row 添加002、重新排列index并且放弃原来的两个index\n",
    "students = page_001.append(page_002).reset_index(drop=True)\n",
    "# 追加新建：stu新建 row 放到students后面并且忽略index不然报错\n",
    "stu = pd.Series({'ID': 41, 'Name': 'Abel', 'Score': 90})\n",
    "students = students.append(stu, ignore_index=True)\n",
    "# 删除（可切片）：students放弃index39到40 row 并且赋值给 students\n",
    "students = students.drop(index=[39, 40])\n",
    "# 插入（切片操作）\n",
    "stu = pd.Series({'ID': 100, 'Name': 'Bailey', 'Score': 100})\n",
    "part1 = students[:21]  # .iloc[] is the same\n",
    "part2 = students[21:]\n",
    "students = part1.append(stu, ignore_index=True).append(part2).reset_index(drop=True)\n",
    "# 更改覆盖\n",
    "stu = pd.Series({'ID': 101, 'Name': 'Danni', 'Score': 101})\n",
    "students.iloc[39] = stu\n",
    "# 设置空值\n",
    "for i in range(5, 15):\n",
    "    students['Name'].at[i] = ''\n",
    "# 去掉空值\n",
    "missing = students.loc[students['Name'] == '']\n",
    "students.drop(missing.index, inplace=True)\n",
    "\n",
    "\n",
    "#列操作集锦\n",
    "students = pd.read_excel('C:/Temp/Students.xlsx')\n",
    "# 追加列\n",
    "students['Age'] = 25\n",
    "# 删除列\n",
    "students.drop(columns=['Score', 'Age'], inplace=True)\n",
    "# 插入列\n",
    "students.insert(1, column='Foo', value=np.repeat('foo', len(students)))\n",
    "# 改列名\n",
    "students.rename(columns={'Foo': 'FOO', 'Name': 'NAME'}, inplace=True)\n",
    "# 设置空值\n",
    "students['ID'] = students['ID'].astype(float)\n",
    "for i in range(5, 15):\n",
    "    students['ID'].at[i] = np.nan\n",
    "# 去掉空值\n",
    "students.dropna(inplace=True)\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "#时间轴处理集锦 dt类（有空看一下）\n",
    "#设置 创建时间 列 数据类型为 datetime64[ns]\n",
    "df['创建时间'] = pd.to_datetime(df.创建时间)\n",
    "#查看datetime类型\n",
    "df['创建时间'].dt.year.unique()\n",
    "df['创建时间']].dt.month.unique()\n",
    "df['创建时间']].dt.day.unique()\n",
    "#查看day=26天的数据有多少\n",
    "df[df['创建时间'].dt.day == 26]\n",
    "#查看第6行 创建时间列 与 第200行 创建时间列时间差距\n",
    "df.loc[6,'创建时间'] - df.loc[200,'创建时间']\n",
    "#创建新 开票星期几 列 然后 把创建时间列算下星期几或者时间\n",
    "df['开票星期几'] = pd.DatetimeIndex(df.创建时间).dayofweek\n",
    "\n",
    "\n",
    "\n",
    "#特殊\n",
    "100-df.isnull().sum() #每列df.isnull每列False与True 求True的sum，100对每个序列减\n",
    "\n",
    "#数据行列转换\n",
    "df.shape\n",
    "#从numpy角度 (3,10).几位置就是几维素组，位置本身就是信息。axis=1 就是 10位置 与axis=-1 一致\n",
    "#22-26课看下\n",
    "\n",
    "#小知识：python3.5 pandas与python3.6 pandas转换 list语法不同\n",
    "df['a列'].values.tolist()  # python3.5的 先转换为nparry在用np转换list\n",
    "df['a列'].to_list()   # python3. 6的非常优雅\n",
    "\n",
    "list1 = df_hospital['客户编码'].values.tolist()\n",
    "df = df[~df['客户编码'].isin(list1)]  # ~ 选择不再list1列表里面的数据 经典       \n",
    "\n",
    "# 小知识 删除 所在列有null的行\n",
    "df.info() # 观察到\n",
    "df['金额'].isnull().value_counts()  #  发现金额列有几个null值\n",
    "df['金额'] = df['金额'].fillna(\"这是空值\")  # 先空值填空\n",
    "list_index = df[df['金额'] == \"这是空值\"].index.tolist() # 拿到index\n",
    "df = df.drop(list_index)  # 删除空值行\n",
    "\n",
    "# 或者一行代码\n",
    "df = df.dropna(subset=[\"金额\"])  # axis默认0\n",
    "\n",
    "\n",
    "\n",
    "https://blog.csdn.net/liufang0001/article/details/77856255\n",
    "\n",
    "np.where #函数\n",
    "s = pd.Series(range(5))\n",
    "s = np.where(s>2,'高',s)\n",
    ">> array(['0', '1', '2', '高', '高'], dtype='<U21')\n",
    "# 可以且套使用\n",
    "s = pd.Series(range(5))\n",
    "s = np.where(s==2,'高',np.where(s==1,'zhes',s))\n",
    ">> array(['0', 'zhes', '高', '3', '4'], dtype='<U21')\n",
    "#微信收藏\n",
    "pub = df['Place of Publication']  # 拿到 这一列 Series\n",
    "london = pub.str.contains(\"London\") # 变量london 拿到含有 London字段\n",
    "oxford = pub.str.contains(\"Oxford\") \n",
    "df['Place of Publication'] = np.where(london,\"London\",np.where(oxford,\"Oxford\",pub.str.replace(\"_\",\"\")))\n",
    "\n",
    "# 开启正则re模式 apply应用\n",
    "import pandas as pd\n",
    "import re\n",
    "gl_path = r\"C:\\Users\\yanglichao\\Desktop\\药事服务项目管理\\月_品种客户销售统计\\201901.csv\"\n",
    "df = pd.read_csv(gl_path,encoding = \"gb18030\",engine = \"python\",header=1)\n",
    "# 选择有用数据列\n",
    "df = df.loc[:,[\"客户\",\"商品编码\",\"商品\",\"单位\",\"数量\",\"金额\",\"考核毛利\"]]\n",
    "# 观察数据是否有null\n",
    "df.isnull().any()\n",
    "# drop 有空值得行\n",
    "df.dropna(inplace = True)\n",
    "df.reset_index(drop = True,inplace = True)  #重新设置索引\n",
    "df[\"数量\"] = df[\"数量\"].astype(\"int32\")\n",
    "\n",
    "import re \n",
    "def search_word(row):\n",
    "    pattern = re.compile(r\"仪征*\")\n",
    "    if pattern.search(row):\n",
    "        return row\n",
    "    # 错误则返回None\n",
    "new_df = df[\"客户\"].apply(search_word)  # 里面天函数名称\n",
    "df[~new_df.isnull()]  # 这个完美 新的new_de Serise index一样 isnull()布尔索引的去，反值~\n",
    "\n",
    "new_df = pd.DataFrame(new_df)  # 返回结果 pd下\n",
    "new_df[new_df[\"客户\"].notnull()] # 看下notnull()结果\n",
    "new_df[new_df.notnull()].index  # 或者直接拿到索引 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x35a4130>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "df = pd.DataFrame({0:[\"Bob\",\"Jessica\",\"Mary\",\"John\",\"Mel\"],1:[968,155,77,578,973]})\n",
    "df.rename(columns={ df.columns[1]: \"new name\" },inplace=True) # 第二列 名字修改\n",
    "df.columns = [\"Names\",\"Births\"]  # 修改 列 名称\n",
    "df.dtypes  # 列数据类型\n",
    "df.sort_values([\"Births\"],ascending = False)  # 排序\n",
    "# df[\"Names\"][df['Births'] == df['Births'].max()].values\n",
    "df[\"Names\"].unique()  # Names列 独一无二的元素 可以用 for 迭代\n",
    "df[\"Names\"].describe()  # Names列 对这一列的描述\n",
    "df['Births'].max()  # 现金列最大数字\n",
    "df1 = df.set_index('Names')  # 重新设置索引时候用个变量接一下\n",
    "df1.plot.bar()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "s = pd.Series(range(5))\n",
    "s = np.where(s==2,'高',np.where(s==1,'zhes',s))\n",
    "a = [1,2,3]\n",
    "b =[22,33]\n",
    "c = [44,b]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 测试正则表达式匹配模式字符串\n",
    "import pandas as pd\n",
    "import re\n",
    "gl_path = r\"C:\\Users\\yanglichao\\Desktop\\药事服务项目管理\\月_品种客户销售统计\\201901.csv\"\n",
    "df = pd.read_csv(gl_path,encoding = \"gb18030\",engine = \"python\",header=1)\n",
    "# 选择有用数据列\n",
    "df = df.loc[:,[\"客户\",\"商品编码\",\"商品\",\"单位\",\"数量\",\"金额\",\"考核毛利\"]]\n",
    "# 观察数据是否有null\n",
    "df.isnull().any()\n",
    "# drop 有空值得行\n",
    "df.dropna(inplace = True)\n",
    "df.reset_index(drop = True,inplace = True)  #重新设置索引\n",
    "df[\"数量\"] = df[\"数量\"].astype(\"int32\")\n",
    "\n",
    "def search_word(row):\n",
    "    pattern = re.compile(r\"仪征\")\n",
    "    if pattern.search(row):\n",
    "        return row\n",
    "        #print(row.index)\n",
    "new_df = df[\"客户\"].apply(search_word)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "218065760"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "my_arr = np.ones((5,8))\n",
    "you_arr = np.random.rand(6,10)\n",
    "id(you_arr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1, 2, 3],\n",
       "       [4, 5, 6]])"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr = np.array([[1,2,3],[4,5,6]])\n",
    "arr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-0.84519568,  0.2198989 ,  1.2672213 ,  1.33436618],\n",
       "       [-0.49741943,  1.14368852,  0.79998735, -0.53127596]])"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "names = np.array([\"bob\",\"joe\",\"will\",\"bob\",\"ylc\",\"zqq\"])\n",
    "data = np.random.randn(6,4)\n",
    "data[names==\"bob\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-0.4723684 , -0.56585684,  1.51581052,  0.50058981],\n",
       "       [ 0.66614456,  1.90497663,  1.1893093 , -0.7337945 ],\n",
       "       [ 0.92742914,  0.39077375, -1.4258795 , -0.64923384],\n",
       "       [ 1.16392773,  0.35924732, -1.10789746, -1.60999355],\n",
       "       [-0.68076903,  0.89040276,  0.94035013,  1.0002827 ],\n",
       "       [-0.43452905,  0.28757482, -0.08426303, -1.61423424],\n",
       "       [ 0.67432262, -0.11822617, -0.13384411, -0.26384518],\n",
       "       [-2.28477064, -0.11547687,  0.70927521,  0.38810573]])"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr = np.random.randn(8,4)\n",
    "arr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "   Nevada  ylc\n",
      "一     2.4  6.6\n",
      "二     6.3  5.8\n",
      "三     7.0  9.0\n",
      "   Nevada  ylc\n",
      "1     2.4  6.6\n",
      "2     6.3  5.8\n",
      "3     7.0  9.0\n"
     ]
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "frame = pd.DataFrame({\"Nevada\":[2.4,6.3,7],\"ylc\":[6.6,5.8,9]},index=[\"一\",\"二\",\"三\"])\n",
    "frame1 = pd.DataFrame({\"Nevada\":[2.4,6.3,7],\"ylc\":[6.6,5.8,9]},index=[\"1\",\"2\",\"3\"])\n",
    "print(frame)\n",
    "print(frame1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Nevada</th>\n",
       "      <th>ylc</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>一</th>\n",
       "      <td>2.4</td>\n",
       "      <td>6.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>二</th>\n",
       "      <td>6.3</td>\n",
       "      <td>5.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>三</th>\n",
       "      <td>7.0</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Nevada  ylc\n",
       "一     2.4  6.6\n",
       "二     6.3  5.8\n",
       "三     7.0  9.0\n",
       "1     NaN  NaN\n",
       "2     NaN  NaN\n",
       "3     NaN  NaN"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "index = frame.index.append(frame1.index)\n",
    "frame.reindex(index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "7.0"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "frame.at[\"三\",\"Nevada\"]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[0, 1, 2, 3, 4, 5]"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "frame = pd.DataFrame(np.arange(18).reshape(6,3),columns=list(\"and\"))\n",
    "def f(x):\n",
    "    return pd.Series([x.min(),x.max()],index=[\"min\",\"max_1\"])\n",
    "frame.loc[1,\"a\"] = 20\n",
    "frame.index.values.tolist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>a</th>\n",
       "      <th>n</th>\n",
       "      <th>d</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>6.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     a    n    d\n",
       "0  1.0  1.0  1.0\n",
       "1  6.0  2.0  2.0\n",
       "2  2.0  3.0  3.0\n",
       "3  3.0  4.0  4.0\n",
       "4  4.0  5.0  5.0\n",
       "5  5.0  6.0  6.0"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "frame.rank()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "frame.index.is_unique  # index 是否唯一"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>a</th>\n",
       "      <th>n</th>\n",
       "      <th>d</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>20</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>9</td>\n",
       "      <td>10</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>15</td>\n",
       "      <td>16</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    a   n   d\n",
       "0   0   1   2\n",
       "1  20   4   5\n",
       "2   6   7   8\n",
       "3   9  10  11\n",
       "4  12  13  14\n",
       "5  15  16  17"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "frame.iloc[:,0].value_counts()\n",
    "frame"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>a</th>\n",
       "      <th>n</th>\n",
       "      <th>d</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      a    n    d\n",
       "0   1.0  0.0  0.0\n",
       "1   0.0  1.0  0.0\n",
       "2   0.0  0.0  1.0\n",
       "4   0.0  1.0  0.0\n",
       "5   0.0  0.0  1.0\n",
       "6   1.0  0.0  0.0\n",
       "7   0.0  1.0  0.0\n",
       "8   0.0  0.0  1.0\n",
       "9   1.0  0.0  0.0\n",
       "10  0.0  1.0  0.0\n",
       "11  0.0  0.0  1.0\n",
       "12  1.0  0.0  0.0\n",
       "13  0.0  1.0  0.0\n",
       "14  0.0  0.0  1.0\n",
       "15  1.0  0.0  0.0\n",
       "16  0.0  1.0  0.0\n",
       "17  0.0  0.0  1.0\n",
       "20  1.0  0.0  0.0"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "frame.apply(pd.value_counts).fillna(0)  # 对每一列数值计算个数 重点是appy对Series应用"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>assignee</th>\n",
       "      <th>assignees</th>\n",
       "      <th>author_association</th>\n",
       "      <th>body</th>\n",
       "      <th>closed_at</th>\n",
       "      <th>comments</th>\n",
       "      <th>comments_url</th>\n",
       "      <th>created_at</th>\n",
       "      <th>events_url</th>\n",
       "      <th>html_url</th>\n",
       "      <th>...</th>\n",
       "      <th>milestone</th>\n",
       "      <th>node_id</th>\n",
       "      <th>number</th>\n",
       "      <th>pull_request</th>\n",
       "      <th>repository_url</th>\n",
       "      <th>state</th>\n",
       "      <th>title</th>\n",
       "      <th>updated_at</th>\n",
       "      <th>url</th>\n",
       "      <th>user</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>NONE</td>\n",
       "      <td>- [x] closes  #26557 \\r\\n- [x] passes `git dif...</td>\n",
       "      <td>None</td>\n",
       "      <td>2</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-06T03:49:53Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/pull/26684</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDExOlB1bGxSZXF1ZXN0Mjg1NjMyMzE0</td>\n",
       "      <td>26684</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>Deprecate Series/Dataframe.to_dense/to_sparse</td>\n",
       "      <td>2019-06-06T04:29:29Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'intEll1gent', 'id': 41290641, 'node...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>NONE</td>\n",
       "      <td>Reindexing a tz aware dataframe using method='...</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-06T01:13:19Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26683</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDU6SXNzdWU0NTI3ODUwOTY=</td>\n",
       "      <td>26683</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>Warning while reindexing tz aware index with m...</td>\n",
       "      <td>2019-06-06T01:13:19Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'goriccardo', 'id': 41048, 'node_id'...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>NONE</td>\n",
       "      <td>#### Code Sample, a copy-pastable example if p...</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T23:28:46Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26682</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDU6SXNzdWU0NTI3NjE0NzA=</td>\n",
       "      <td>26682</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>read_sql_query converts empty columns to objec...</td>\n",
       "      <td>2019-06-05T23:28:46Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'lengau', 'id': 4305943, 'node_id': ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>NONE</td>\n",
       "      <td>#LondonPythonSprints\\r\\n\\r\\n- [ ] closes #xxxx...</td>\n",
       "      <td>None</td>\n",
       "      <td>2</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T19:55:46Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/pull/26679</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDExOlB1bGxSZXF1ZXN0Mjg1NTI2OTE0</td>\n",
       "      <td>26679</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>Fixed warning in doc build</td>\n",
       "      <td>2019-06-05T21:21:04Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'nadebu', 'id': 46745130, 'node_id':...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>MEMBER</td>\n",
       "      <td>In master we get the following warnings in thi...</td>\n",
       "      <td>None</td>\n",
       "      <td>1</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T19:44:38Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/pull/26678</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDExOlB1bGxSZXF1ZXN0Mjg1NTIzMzQw</td>\n",
       "      <td>26678</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>TST: avoid matplotlib warnings in tests</td>\n",
       "      <td>2019-06-06T01:59:35Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'jbrockmendel', 'id': 8078968, 'node...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>CONTRIBUTOR</td>\n",
       "      <td>#LondonPythonSprints\\r\\n\\r\\n- [ ] closes #2667...</td>\n",
       "      <td>None</td>\n",
       "      <td>1</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T19:41:28Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/pull/26677</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDExOlB1bGxSZXF1ZXN0Mjg1NTIyMzE4</td>\n",
       "      <td>26677</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>BUG: .isin on datetimelike indexes do not vali...</td>\n",
       "      <td>2019-06-06T03:02:02Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'simonjayhawkins', 'id': 13159005, '...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>MEMBER</td>\n",
       "      <td>tests.plotting.test_frame.TestDataFramePlots.t...</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T19:41:21Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26676</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDU6SXNzdWU0NTI2ODE2MjA=</td>\n",
       "      <td>26676</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>VIS: test plots losing information on y axis</td>\n",
       "      <td>2019-06-05T19:41:21Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'jbrockmendel', 'id': 8078968, 'node...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>CONTRIBUTOR</td>\n",
       "      <td>#### Code Sample, a copy-pastable example if p...</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T19:35:11Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26675</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDU6SXNzdWU0NTI2NzkyNzk=</td>\n",
       "      <td>26675</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>BUG: .isin on datetimelike indexes do not vali...</td>\n",
       "      <td>2019-06-06T03:01:15Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'simonjayhawkins', 'id': 13159005, '...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>MEMBER</td>\n",
       "      <td>It's marked as slow, making it easy to fall th...</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T19:16:23Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26673</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDU6SXNzdWU0NTI2NzE2NDk=</td>\n",
       "      <td>26673</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>TST: tests.plotting.test_frame.test_subplots f...</td>\n",
       "      <td>2019-06-05T19:16:23Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'jbrockmendel', 'id': 8078968, 'node...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>CONTRIBUTOR</td>\n",
       "      <td>#LondonPythonSprints\\r\\n\\r\\n- [x] closes #2666...</td>\n",
       "      <td>None</td>\n",
       "      <td>1</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T18:50:41Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/pull/26671</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDExOlB1bGxSZXF1ZXN0Mjg1NTA1NjYz</td>\n",
       "      <td>26671</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>WIP: isort init files</td>\n",
       "      <td>2019-06-05T19:45:52Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'alimcmaster1', 'id': 16733618, 'nod...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>CONTRIBUTOR</td>\n",
       "      <td>#LondonPythonSprints\\r\\n\\r\\n- [] closes #26656...</td>\n",
       "      <td>None</td>\n",
       "      <td>1</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T18:27:50Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/pull/26670</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDExOlB1bGxSZXF1ZXN0Mjg1NDk3Njkx</td>\n",
       "      <td>26670</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>environment.yml encounters import error with p...</td>\n",
       "      <td>2019-06-05T20:03:30Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'minggli', 'id': 14131823, 'node_id'...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>CONTRIBUTOR</td>\n",
       "      <td>#### Code Sample, a copy-pastable example if p...</td>\n",
       "      <td>None</td>\n",
       "      <td>8</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T15:13:17Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26667</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDU6SXNzdWU0NTI1NTkzMDk=</td>\n",
       "      <td>26667</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>pandas cannot actually read Stata file format 104</td>\n",
       "      <td>2019-06-05T21:35:19Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'miker985', 'id': 26555712, 'node_id...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>MEMBER</td>\n",
       "      <td>IIUC py37 supports patching of module-level `_...</td>\n",
       "      <td>None</td>\n",
       "      <td>3</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T14:52:17Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26666</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDU6SXNzdWU0NTI1NDczMTY=</td>\n",
       "      <td>26666</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>PERF: use lazy imports on py37 to speed up import</td>\n",
       "      <td>2019-06-05T22:03:28Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'jbrockmendel', 'id': 8078968, 'node...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>MEMBER</td>\n",
       "      <td>Not entirely sure how to do it with asv, but a...</td>\n",
       "      <td>None</td>\n",
       "      <td>2</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T13:56:27Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26663</td>\n",
       "      <td>...</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>MDU6SXNzdWU0NTI1MTYxNjE=</td>\n",
       "      <td>26663</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>PERF: asv for import time</td>\n",
       "      <td>2019-06-05T22:06:10Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'jbrockmendel', 'id': 8078968, 'node...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>MEMBER</td>\n",
       "      <td>Follow up to #26579\\r\\n\\r\\nRemoving the frame2...</td>\n",
       "      <td>None</td>\n",
       "      <td>3</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T13:49:22Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/pull/26662</td>\n",
       "      <td>...</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>MDExOlB1bGxSZXF1ZXN0Mjg1MzgzNjIw</td>\n",
       "      <td>26662</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>Excel Tests Continued Fixture Cleanup</td>\n",
       "      <td>2019-06-05T16:50:22Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'WillAyd', 'id': 609873, 'node_id': ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>MEMBER</td>\n",
       "      <td>In #25455 we added `isort` as a dependency to ...</td>\n",
       "      <td>None</td>\n",
       "      <td>1</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T13:46:49Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26661</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDU6SXNzdWU0NTI1MTEwNjU=</td>\n",
       "      <td>26661</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>CI: Remove isort from CI dependencies</td>\n",
       "      <td>2019-06-05T18:37:38Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'datapythonista', 'id': 10058240, 'n...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>NONE</td>\n",
       "      <td>#### Code Sample, a copy-pastable example if p...</td>\n",
       "      <td>None</td>\n",
       "      <td>2</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T13:43:06Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26660</td>\n",
       "      <td>...</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>MDU6SXNzdWU0NTI1MDkwNzA=</td>\n",
       "      <td>26660</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>Indices of df.describe(percentiles=np.linspace...</td>\n",
       "      <td>2019-06-05T22:31:49Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'jkovacevic', 'id': 24897067, 'node_...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>MEMBER</td>\n",
       "      <td>Our dependencies file `environment.yml` (https...</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T13:08:15Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26659</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDU6SXNzdWU0NTI0OTE1NjY=</td>\n",
       "      <td>26659</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>DEPS: Group dependencies and provide informati...</td>\n",
       "      <td>2019-06-05T13:08:15Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'datapythonista', 'id': 10058240, 'n...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>CONTRIBUTOR</td>\n",
       "      <td>Is this a bug, or deliberate?\\r\\n\\r\\n```python...</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T11:44:26Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26658</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDU6SXNzdWU0NTI0NTY0MDE=</td>\n",
       "      <td>26658</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>loc allows different length boolean indexer</td>\n",
       "      <td>2019-06-05T11:44:26Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'TomAugspurger', 'id': 1312546, 'nod...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>MEMBER</td>\n",
       "      <td>In #26648, when we tried to use `environment.y...</td>\n",
       "      <td>None</td>\n",
       "      <td>1</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T10:57:40Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26656</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDU6SXNzdWU0NTI0Mzg1MDQ=</td>\n",
       "      <td>26656</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>CI/DOC: pyarrow ImportError when using environ...</td>\n",
       "      <td>2019-06-05T20:20:29Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'datapythonista', 'id': 10058240, 'n...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>NONE</td>\n",
       "      <td>Uses a similar convention as numpy's ufunc ove...</td>\n",
       "      <td>None</td>\n",
       "      <td>7</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-05T02:50:15Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/pull/26652</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDExOlB1bGxSZXF1ZXN0Mjg1MjA5ODA0</td>\n",
       "      <td>26652</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>Allow operator overloading for custom classes ...</td>\n",
       "      <td>2019-06-05T16:37:00Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'mhsekhavat', 'id': 767425, 'node_id...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>MEMBER</td>\n",
       "      <td>- [x] closes #24252\\r\\n- [x] tests added / pas...</td>\n",
       "      <td>None</td>\n",
       "      <td>4</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-04T21:05:19Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/pull/26651</td>\n",
       "      <td>...</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>MDExOlB1bGxSZXF1ZXN0Mjg1MTQ0MTQy</td>\n",
       "      <td>26651</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>BUG: avoid overflow in Bday generate_range, cl...</td>\n",
       "      <td>2019-06-06T00:29:53Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'jbrockmendel', 'id': 8078968, 'node...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>NONE</td>\n",
       "      <td>#### Code Sample\\r\\n\\r\\n```python\\r\\nimport pa...</td>\n",
       "      <td>None</td>\n",
       "      <td>1</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-04T18:51:44Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26650</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDU6SXNzdWU0NTIxNTI5ODA=</td>\n",
       "      <td>26650</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>Handle numpy.matmul in DataFrame.__array_ufunc__</td>\n",
       "      <td>2019-06-04T18:59:20Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'nate-bryant', 'id': 48369202, 'node...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>NONE</td>\n",
       "      <td>#### Code Sample, a copy-pastable example if p...</td>\n",
       "      <td>None</td>\n",
       "      <td>1</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-04T18:08:00Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26649</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDU6SXNzdWU0NTIxMzQ4Mzg=</td>\n",
       "      <td>26649</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>merge_asof with one tz-aware datetime \"by\" par...</td>\n",
       "      <td>2019-06-04T22:42:58Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'arthurandres', 'id': 80800, 'node_i...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>MEMBER</td>\n",
       "      <td>- [X] xref #22766, #26574\\r\\n- [ ] tests added...</td>\n",
       "      <td>None</td>\n",
       "      <td>7</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-04T16:29:15Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/pull/26648</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDExOlB1bGxSZXF1ZXN0Mjg1MDUyMTcx</td>\n",
       "      <td>26648</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>CI/DOC: Building the documentation with azure...</td>\n",
       "      <td>2019-06-05T16:20:57Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'datapythonista', 'id': 10058240, 'n...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>NONE</td>\n",
       "      <td>The data argument in json_normalize requires b...</td>\n",
       "      <td>None</td>\n",
       "      <td>4</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-04T15:06:31Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26647</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDU6SXNzdWU0NTIwNTE4OTI=</td>\n",
       "      <td>26647</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>json_normalize Support for Generators</td>\n",
       "      <td>2019-06-05T12:20:24Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'msteijaert', 'id': 8099328, 'node_i...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>MEMBER</td>\n",
       "      <td>Now that we've wound down a lot of the mistype...</td>\n",
       "      <td>None</td>\n",
       "      <td>7</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-04T11:56:04Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/pull/26645</td>\n",
       "      <td>...</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>MDExOlB1bGxSZXF1ZXN0Mjg0OTM4OTky</td>\n",
       "      <td>26645</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>MyPy.ini Make Import Machinery Explicit</td>\n",
       "      <td>2019-06-05T12:10:13Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'WillAyd', 'id': 609873, 'node_id': ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>MEMBER</td>\n",
       "      <td>This PR is not intended to be merged. The refa...</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-04T11:02:17Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/pull/26644</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDExOlB1bGxSZXF1ZXN0Mjg0OTIxNTgw</td>\n",
       "      <td>26644</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>PLEASE IGNORE: Testing CI of plot refactoring ...</td>\n",
       "      <td>2019-06-04T11:40:23Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'datapythonista', 'id': 10058240, 'n...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>CONTRIBUTOR</td>\n",
       "      <td>I've made a PR to remove ``NDFrame.select``, s...</td>\n",
       "      <td>None</td>\n",
       "      <td>2</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-04T00:19:28Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26642</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>MDU6SXNzdWU0NTE3NDI3NTU=</td>\n",
       "      <td>26642</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>Rename NDFrame.filter to .select?</td>\n",
       "      <td>2019-06-04T01:19:48Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'topper-123', 'id': 26364415, 'node_...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>None</td>\n",
       "      <td>[]</td>\n",
       "      <td>CONTRIBUTOR</td>\n",
       "      <td>A whole bunch of them: \\r\\n\\r\\n- [ ] InferFreq...</td>\n",
       "      <td>None</td>\n",
       "      <td>1</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>2019-06-03T21:27:49Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>https://github.com/pandas-dev/pandas/issues/26640</td>\n",
       "      <td>...</td>\n",
       "      <td>{'url': 'https://api.github.com/repos/pandas-d...</td>\n",
       "      <td>MDU6SXNzdWU0NTE2OTc2MDA=</td>\n",
       "      <td>26640</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas</td>\n",
       "      <td>open</td>\n",
       "      <td>Investigate performance regression in TimeSeri...</td>\n",
       "      <td>2019-06-04T02:25:38Z</td>\n",
       "      <td>https://api.github.com/repos/pandas-dev/pandas...</td>\n",
       "      <td>{'login': 'TomAugspurger', 'id': 1312546, 'nod...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>30 rows × 24 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   assignee assignees author_association  \\\n",
       "0      None        []               NONE   \n",
       "1      None        []               NONE   \n",
       "2      None        []               NONE   \n",
       "3      None        []               NONE   \n",
       "4      None        []             MEMBER   \n",
       "5      None        []        CONTRIBUTOR   \n",
       "6      None        []             MEMBER   \n",
       "7      None        []        CONTRIBUTOR   \n",
       "8      None        []             MEMBER   \n",
       "9      None        []        CONTRIBUTOR   \n",
       "10     None        []        CONTRIBUTOR   \n",
       "11     None        []        CONTRIBUTOR   \n",
       "12     None        []             MEMBER   \n",
       "13     None        []             MEMBER   \n",
       "14     None        []             MEMBER   \n",
       "15     None        []             MEMBER   \n",
       "16     None        []               NONE   \n",
       "17     None        []             MEMBER   \n",
       "18     None        []        CONTRIBUTOR   \n",
       "19     None        []             MEMBER   \n",
       "20     None        []               NONE   \n",
       "21     None        []             MEMBER   \n",
       "22     None        []               NONE   \n",
       "23     None        []               NONE   \n",
       "24     None        []             MEMBER   \n",
       "25     None        []               NONE   \n",
       "26     None        []             MEMBER   \n",
       "27     None        []             MEMBER   \n",
       "28     None        []        CONTRIBUTOR   \n",
       "29     None        []        CONTRIBUTOR   \n",
       "\n",
       "                                                 body closed_at  comments  \\\n",
       "0   - [x] closes  #26557 \\r\\n- [x] passes `git dif...      None         2   \n",
       "1   Reindexing a tz aware dataframe using method='...      None         0   \n",
       "2   #### Code Sample, a copy-pastable example if p...      None         0   \n",
       "3   #LondonPythonSprints\\r\\n\\r\\n- [ ] closes #xxxx...      None         2   \n",
       "4   In master we get the following warnings in thi...      None         1   \n",
       "5   #LondonPythonSprints\\r\\n\\r\\n- [ ] closes #2667...      None         1   \n",
       "6   tests.plotting.test_frame.TestDataFramePlots.t...      None         0   \n",
       "7   #### Code Sample, a copy-pastable example if p...      None         0   \n",
       "8   It's marked as slow, making it easy to fall th...      None         0   \n",
       "9   #LondonPythonSprints\\r\\n\\r\\n- [x] closes #2666...      None         1   \n",
       "10  #LondonPythonSprints\\r\\n\\r\\n- [] closes #26656...      None         1   \n",
       "11  #### Code Sample, a copy-pastable example if p...      None         8   \n",
       "12  IIUC py37 supports patching of module-level `_...      None         3   \n",
       "13  Not entirely sure how to do it with asv, but a...      None         2   \n",
       "14  Follow up to #26579\\r\\n\\r\\nRemoving the frame2...      None         3   \n",
       "15  In #25455 we added `isort` as a dependency to ...      None         1   \n",
       "16  #### Code Sample, a copy-pastable example if p...      None         2   \n",
       "17  Our dependencies file `environment.yml` (https...      None         0   \n",
       "18  Is this a bug, or deliberate?\\r\\n\\r\\n```python...      None         0   \n",
       "19  In #26648, when we tried to use `environment.y...      None         1   \n",
       "20  Uses a similar convention as numpy's ufunc ove...      None         7   \n",
       "21  - [x] closes #24252\\r\\n- [x] tests added / pas...      None         4   \n",
       "22  #### Code Sample\\r\\n\\r\\n```python\\r\\nimport pa...      None         1   \n",
       "23  #### Code Sample, a copy-pastable example if p...      None         1   \n",
       "24  - [X] xref #22766, #26574\\r\\n- [ ] tests added...      None         7   \n",
       "25  The data argument in json_normalize requires b...      None         4   \n",
       "26  Now that we've wound down a lot of the mistype...      None         7   \n",
       "27  This PR is not intended to be merged. The refa...      None         0   \n",
       "28  I've made a PR to remove ``NDFrame.select``, s...      None         2   \n",
       "29  A whole bunch of them: \\r\\n\\r\\n- [ ] InferFreq...      None         1   \n",
       "\n",
       "                                         comments_url            created_at  \\\n",
       "0   https://api.github.com/repos/pandas-dev/pandas...  2019-06-06T03:49:53Z   \n",
       "1   https://api.github.com/repos/pandas-dev/pandas...  2019-06-06T01:13:19Z   \n",
       "2   https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T23:28:46Z   \n",
       "3   https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T19:55:46Z   \n",
       "4   https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T19:44:38Z   \n",
       "5   https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T19:41:28Z   \n",
       "6   https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T19:41:21Z   \n",
       "7   https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T19:35:11Z   \n",
       "8   https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T19:16:23Z   \n",
       "9   https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T18:50:41Z   \n",
       "10  https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T18:27:50Z   \n",
       "11  https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T15:13:17Z   \n",
       "12  https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T14:52:17Z   \n",
       "13  https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T13:56:27Z   \n",
       "14  https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T13:49:22Z   \n",
       "15  https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T13:46:49Z   \n",
       "16  https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T13:43:06Z   \n",
       "17  https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T13:08:15Z   \n",
       "18  https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T11:44:26Z   \n",
       "19  https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T10:57:40Z   \n",
       "20  https://api.github.com/repos/pandas-dev/pandas...  2019-06-05T02:50:15Z   \n",
       "21  https://api.github.com/repos/pandas-dev/pandas...  2019-06-04T21:05:19Z   \n",
       "22  https://api.github.com/repos/pandas-dev/pandas...  2019-06-04T18:51:44Z   \n",
       "23  https://api.github.com/repos/pandas-dev/pandas...  2019-06-04T18:08:00Z   \n",
       "24  https://api.github.com/repos/pandas-dev/pandas...  2019-06-04T16:29:15Z   \n",
       "25  https://api.github.com/repos/pandas-dev/pandas...  2019-06-04T15:06:31Z   \n",
       "26  https://api.github.com/repos/pandas-dev/pandas...  2019-06-04T11:56:04Z   \n",
       "27  https://api.github.com/repos/pandas-dev/pandas...  2019-06-04T11:02:17Z   \n",
       "28  https://api.github.com/repos/pandas-dev/pandas...  2019-06-04T00:19:28Z   \n",
       "29  https://api.github.com/repos/pandas-dev/pandas...  2019-06-03T21:27:49Z   \n",
       "\n",
       "                                           events_url  \\\n",
       "0   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "1   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "2   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "3   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "4   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "5   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "6   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "7   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "8   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "9   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "10  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "11  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "12  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "13  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "14  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "15  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "16  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "17  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "18  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "19  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "20  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "21  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "22  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "23  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "24  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "25  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "26  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "27  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "28  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "29  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "\n",
       "                                             html_url  \\\n",
       "0     https://github.com/pandas-dev/pandas/pull/26684   \n",
       "1   https://github.com/pandas-dev/pandas/issues/26683   \n",
       "2   https://github.com/pandas-dev/pandas/issues/26682   \n",
       "3     https://github.com/pandas-dev/pandas/pull/26679   \n",
       "4     https://github.com/pandas-dev/pandas/pull/26678   \n",
       "5     https://github.com/pandas-dev/pandas/pull/26677   \n",
       "6   https://github.com/pandas-dev/pandas/issues/26676   \n",
       "7   https://github.com/pandas-dev/pandas/issues/26675   \n",
       "8   https://github.com/pandas-dev/pandas/issues/26673   \n",
       "9     https://github.com/pandas-dev/pandas/pull/26671   \n",
       "10    https://github.com/pandas-dev/pandas/pull/26670   \n",
       "11  https://github.com/pandas-dev/pandas/issues/26667   \n",
       "12  https://github.com/pandas-dev/pandas/issues/26666   \n",
       "13  https://github.com/pandas-dev/pandas/issues/26663   \n",
       "14    https://github.com/pandas-dev/pandas/pull/26662   \n",
       "15  https://github.com/pandas-dev/pandas/issues/26661   \n",
       "16  https://github.com/pandas-dev/pandas/issues/26660   \n",
       "17  https://github.com/pandas-dev/pandas/issues/26659   \n",
       "18  https://github.com/pandas-dev/pandas/issues/26658   \n",
       "19  https://github.com/pandas-dev/pandas/issues/26656   \n",
       "20    https://github.com/pandas-dev/pandas/pull/26652   \n",
       "21    https://github.com/pandas-dev/pandas/pull/26651   \n",
       "22  https://github.com/pandas-dev/pandas/issues/26650   \n",
       "23  https://github.com/pandas-dev/pandas/issues/26649   \n",
       "24    https://github.com/pandas-dev/pandas/pull/26648   \n",
       "25  https://github.com/pandas-dev/pandas/issues/26647   \n",
       "26    https://github.com/pandas-dev/pandas/pull/26645   \n",
       "27    https://github.com/pandas-dev/pandas/pull/26644   \n",
       "28  https://github.com/pandas-dev/pandas/issues/26642   \n",
       "29  https://github.com/pandas-dev/pandas/issues/26640   \n",
       "\n",
       "                          ...                          \\\n",
       "0                         ...                           \n",
       "1                         ...                           \n",
       "2                         ...                           \n",
       "3                         ...                           \n",
       "4                         ...                           \n",
       "5                         ...                           \n",
       "6                         ...                           \n",
       "7                         ...                           \n",
       "8                         ...                           \n",
       "9                         ...                           \n",
       "10                        ...                           \n",
       "11                        ...                           \n",
       "12                        ...                           \n",
       "13                        ...                           \n",
       "14                        ...                           \n",
       "15                        ...                           \n",
       "16                        ...                           \n",
       "17                        ...                           \n",
       "18                        ...                           \n",
       "19                        ...                           \n",
       "20                        ...                           \n",
       "21                        ...                           \n",
       "22                        ...                           \n",
       "23                        ...                           \n",
       "24                        ...                           \n",
       "25                        ...                           \n",
       "26                        ...                           \n",
       "27                        ...                           \n",
       "28                        ...                           \n",
       "29                        ...                           \n",
       "\n",
       "                                            milestone  \\\n",
       "0                                                None   \n",
       "1                                                None   \n",
       "2                                                None   \n",
       "3                                                None   \n",
       "4                                                None   \n",
       "5                                                None   \n",
       "6                                                None   \n",
       "7                                                None   \n",
       "8                                                None   \n",
       "9                                                None   \n",
       "10                                               None   \n",
       "11                                               None   \n",
       "12                                               None   \n",
       "13  {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "14  {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "15                                               None   \n",
       "16  {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "17                                               None   \n",
       "18                                               None   \n",
       "19                                               None   \n",
       "20                                               None   \n",
       "21  {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "22                                               None   \n",
       "23                                               None   \n",
       "24                                               None   \n",
       "25                                               None   \n",
       "26  {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "27                                               None   \n",
       "28                                               None   \n",
       "29  {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "\n",
       "                             node_id number  \\\n",
       "0   MDExOlB1bGxSZXF1ZXN0Mjg1NjMyMzE0  26684   \n",
       "1           MDU6SXNzdWU0NTI3ODUwOTY=  26683   \n",
       "2           MDU6SXNzdWU0NTI3NjE0NzA=  26682   \n",
       "3   MDExOlB1bGxSZXF1ZXN0Mjg1NTI2OTE0  26679   \n",
       "4   MDExOlB1bGxSZXF1ZXN0Mjg1NTIzMzQw  26678   \n",
       "5   MDExOlB1bGxSZXF1ZXN0Mjg1NTIyMzE4  26677   \n",
       "6           MDU6SXNzdWU0NTI2ODE2MjA=  26676   \n",
       "7           MDU6SXNzdWU0NTI2NzkyNzk=  26675   \n",
       "8           MDU6SXNzdWU0NTI2NzE2NDk=  26673   \n",
       "9   MDExOlB1bGxSZXF1ZXN0Mjg1NTA1NjYz  26671   \n",
       "10  MDExOlB1bGxSZXF1ZXN0Mjg1NDk3Njkx  26670   \n",
       "11          MDU6SXNzdWU0NTI1NTkzMDk=  26667   \n",
       "12          MDU6SXNzdWU0NTI1NDczMTY=  26666   \n",
       "13          MDU6SXNzdWU0NTI1MTYxNjE=  26663   \n",
       "14  MDExOlB1bGxSZXF1ZXN0Mjg1MzgzNjIw  26662   \n",
       "15          MDU6SXNzdWU0NTI1MTEwNjU=  26661   \n",
       "16          MDU6SXNzdWU0NTI1MDkwNzA=  26660   \n",
       "17          MDU6SXNzdWU0NTI0OTE1NjY=  26659   \n",
       "18          MDU6SXNzdWU0NTI0NTY0MDE=  26658   \n",
       "19          MDU6SXNzdWU0NTI0Mzg1MDQ=  26656   \n",
       "20  MDExOlB1bGxSZXF1ZXN0Mjg1MjA5ODA0  26652   \n",
       "21  MDExOlB1bGxSZXF1ZXN0Mjg1MTQ0MTQy  26651   \n",
       "22          MDU6SXNzdWU0NTIxNTI5ODA=  26650   \n",
       "23          MDU6SXNzdWU0NTIxMzQ4Mzg=  26649   \n",
       "24  MDExOlB1bGxSZXF1ZXN0Mjg1MDUyMTcx  26648   \n",
       "25          MDU6SXNzdWU0NTIwNTE4OTI=  26647   \n",
       "26  MDExOlB1bGxSZXF1ZXN0Mjg0OTM4OTky  26645   \n",
       "27  MDExOlB1bGxSZXF1ZXN0Mjg0OTIxNTgw  26644   \n",
       "28          MDU6SXNzdWU0NTE3NDI3NTU=  26642   \n",
       "29          MDU6SXNzdWU0NTE2OTc2MDA=  26640   \n",
       "\n",
       "                                         pull_request  \\\n",
       "0   {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "1                                                 NaN   \n",
       "2                                                 NaN   \n",
       "3   {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "4   {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "5   {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "6                                                 NaN   \n",
       "7                                                 NaN   \n",
       "8                                                 NaN   \n",
       "9   {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "10  {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "11                                                NaN   \n",
       "12                                                NaN   \n",
       "13                                                NaN   \n",
       "14  {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "15                                                NaN   \n",
       "16                                                NaN   \n",
       "17                                                NaN   \n",
       "18                                                NaN   \n",
       "19                                                NaN   \n",
       "20  {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "21  {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "22                                                NaN   \n",
       "23                                                NaN   \n",
       "24  {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "25                                                NaN   \n",
       "26  {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "27  {'url': 'https://api.github.com/repos/pandas-d...   \n",
       "28                                                NaN   \n",
       "29                                                NaN   \n",
       "\n",
       "                                    repository_url state  \\\n",
       "0   https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "1   https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "2   https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "3   https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "4   https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "5   https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "6   https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "7   https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "8   https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "9   https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "10  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "11  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "12  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "13  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "14  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "15  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "16  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "17  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "18  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "19  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "20  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "21  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "22  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "23  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "24  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "25  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "26  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "27  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "28  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "29  https://api.github.com/repos/pandas-dev/pandas  open   \n",
       "\n",
       "                                                title            updated_at  \\\n",
       "0       Deprecate Series/Dataframe.to_dense/to_sparse  2019-06-06T04:29:29Z   \n",
       "1   Warning while reindexing tz aware index with m...  2019-06-06T01:13:19Z   \n",
       "2   read_sql_query converts empty columns to objec...  2019-06-05T23:28:46Z   \n",
       "3                          Fixed warning in doc build  2019-06-05T21:21:04Z   \n",
       "4             TST: avoid matplotlib warnings in tests  2019-06-06T01:59:35Z   \n",
       "5   BUG: .isin on datetimelike indexes do not vali...  2019-06-06T03:02:02Z   \n",
       "6        VIS: test plots losing information on y axis  2019-06-05T19:41:21Z   \n",
       "7   BUG: .isin on datetimelike indexes do not vali...  2019-06-06T03:01:15Z   \n",
       "8   TST: tests.plotting.test_frame.test_subplots f...  2019-06-05T19:16:23Z   \n",
       "9                               WIP: isort init files  2019-06-05T19:45:52Z   \n",
       "10  environment.yml encounters import error with p...  2019-06-05T20:03:30Z   \n",
       "11  pandas cannot actually read Stata file format 104  2019-06-05T21:35:19Z   \n",
       "12  PERF: use lazy imports on py37 to speed up import  2019-06-05T22:03:28Z   \n",
       "13                          PERF: asv for import time  2019-06-05T22:06:10Z   \n",
       "14              Excel Tests Continued Fixture Cleanup  2019-06-05T16:50:22Z   \n",
       "15              CI: Remove isort from CI dependencies  2019-06-05T18:37:38Z   \n",
       "16  Indices of df.describe(percentiles=np.linspace...  2019-06-05T22:31:49Z   \n",
       "17  DEPS: Group dependencies and provide informati...  2019-06-05T13:08:15Z   \n",
       "18       loc allows different length boolean indexer   2019-06-05T11:44:26Z   \n",
       "19  CI/DOC: pyarrow ImportError when using environ...  2019-06-05T20:20:29Z   \n",
       "20  Allow operator overloading for custom classes ...  2019-06-05T16:37:00Z   \n",
       "21  BUG: avoid overflow in Bday generate_range, cl...  2019-06-06T00:29:53Z   \n",
       "22   Handle numpy.matmul in DataFrame.__array_ufunc__  2019-06-04T18:59:20Z   \n",
       "23  merge_asof with one tz-aware datetime \"by\" par...  2019-06-04T22:42:58Z   \n",
       "24   CI/DOC: Building the documentation with azure...  2019-06-05T16:20:57Z   \n",
       "25              json_normalize Support for Generators  2019-06-05T12:20:24Z   \n",
       "26            MyPy.ini Make Import Machinery Explicit  2019-06-05T12:10:13Z   \n",
       "27  PLEASE IGNORE: Testing CI of plot refactoring ...  2019-06-04T11:40:23Z   \n",
       "28                  Rename NDFrame.filter to .select?  2019-06-04T01:19:48Z   \n",
       "29  Investigate performance regression in TimeSeri...  2019-06-04T02:25:38Z   \n",
       "\n",
       "                                                  url  \\\n",
       "0   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "1   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "2   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "3   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "4   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "5   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "6   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "7   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "8   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "9   https://api.github.com/repos/pandas-dev/pandas...   \n",
       "10  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "11  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "12  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "13  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "14  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "15  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "16  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "17  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "18  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "19  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "20  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "21  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "22  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "23  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "24  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "25  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "26  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "27  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "28  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "29  https://api.github.com/repos/pandas-dev/pandas...   \n",
       "\n",
       "                                                 user  \n",
       "0   {'login': 'intEll1gent', 'id': 41290641, 'node...  \n",
       "1   {'login': 'goriccardo', 'id': 41048, 'node_id'...  \n",
       "2   {'login': 'lengau', 'id': 4305943, 'node_id': ...  \n",
       "3   {'login': 'nadebu', 'id': 46745130, 'node_id':...  \n",
       "4   {'login': 'jbrockmendel', 'id': 8078968, 'node...  \n",
       "5   {'login': 'simonjayhawkins', 'id': 13159005, '...  \n",
       "6   {'login': 'jbrockmendel', 'id': 8078968, 'node...  \n",
       "7   {'login': 'simonjayhawkins', 'id': 13159005, '...  \n",
       "8   {'login': 'jbrockmendel', 'id': 8078968, 'node...  \n",
       "9   {'login': 'alimcmaster1', 'id': 16733618, 'nod...  \n",
       "10  {'login': 'minggli', 'id': 14131823, 'node_id'...  \n",
       "11  {'login': 'miker985', 'id': 26555712, 'node_id...  \n",
       "12  {'login': 'jbrockmendel', 'id': 8078968, 'node...  \n",
       "13  {'login': 'jbrockmendel', 'id': 8078968, 'node...  \n",
       "14  {'login': 'WillAyd', 'id': 609873, 'node_id': ...  \n",
       "15  {'login': 'datapythonista', 'id': 10058240, 'n...  \n",
       "16  {'login': 'jkovacevic', 'id': 24897067, 'node_...  \n",
       "17  {'login': 'datapythonista', 'id': 10058240, 'n...  \n",
       "18  {'login': 'TomAugspurger', 'id': 1312546, 'nod...  \n",
       "19  {'login': 'datapythonista', 'id': 10058240, 'n...  \n",
       "20  {'login': 'mhsekhavat', 'id': 767425, 'node_id...  \n",
       "21  {'login': 'jbrockmendel', 'id': 8078968, 'node...  \n",
       "22  {'login': 'nate-bryant', 'id': 48369202, 'node...  \n",
       "23  {'login': 'arthurandres', 'id': 80800, 'node_i...  \n",
       "24  {'login': 'datapythonista', 'id': 10058240, 'n...  \n",
       "25  {'login': 'msteijaert', 'id': 8099328, 'node_i...  \n",
       "26  {'login': 'WillAyd', 'id': 609873, 'node_id': ...  \n",
       "27  {'login': 'datapythonista', 'id': 10058240, 'n...  \n",
       "28  {'login': 'topper-123', 'id': 26364415, 'node_...  \n",
       "29  {'login': 'TomAugspurger', 'id': 1312546, 'nod...  \n",
       "\n",
       "[30 rows x 24 columns]"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 数据载入、存储及文件格式\n",
    "import requests\n",
    "import pandas as pd\n",
    "url = \"https://api.github.com/repos/pandas-dev/pandas/issues\"\n",
    "resp = requests.get(url)\n",
    "data = resp.json()\n",
    "issues = pd.DataFrame(data)\n",
    "issues"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['a', 'b', '   guido']"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "val = \"a,b,   guido\"\n",
    "val.split(\",\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"2\" halign=\"left\">Ohio</th>\n",
       "      <th>Colorado</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>Green</th>\n",
       "      <th>Red</th>\n",
       "      <th>Green</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">a</th>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">b</th>\n",
       "      <th>1</th>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>9</td>\n",
       "      <td>10</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Ohio     Colorado\n",
       "    Green Red    Green\n",
       "a 1     0   1        2\n",
       "  2     3   4        5\n",
       "b 1     6   7        8\n",
       "  2     9  10       11"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "frame = pd.DataFrame(np.arange(12).reshape(4,3),index=[[\"a\",\"a\",\"b\",\"b\"],[1,2,1,2]],columns=[[\"Ohio\",\"Ohio\",\"Colorado\"],[\"Green\",\"Red\",\"Green\"]])\n",
    "frame"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[None, None]\n",
      "[None, None]\n"
     ]
    }
   ],
   "source": [
    "print(frame.index.names)\n",
    "print(frame.columns.names)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>state</th>\n",
       "      <th colspan=\"2\" halign=\"left\">Ohio</th>\n",
       "      <th>Colorado</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>Green</th>\n",
       "      <th>Red</th>\n",
       "      <th>Green</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>key1</th>\n",
       "      <th>key2</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">a</th>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">b</th>\n",
       "      <th>1</th>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>9</td>\n",
       "      <td>10</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "state      Ohio     Colorado\n",
       "color     Green Red    Green\n",
       "key1 key2                   \n",
       "a    1        0   1        2\n",
       "     2        3   4        5\n",
       "b    1        6   7        8\n",
       "     2        9  10       11"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "frame.index.names = [\"key1\",\"key2\"]\n",
    "frame.columns.names = [\"state\",\"color\"]\n",
    "frame"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>state</th>\n",
       "      <th>Colorado</th>\n",
       "      <th>Ohio</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>key1</th>\n",
       "      <th>key2</th>\n",
       "      <th>color</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"4\" valign=\"top\">a</th>\n",
       "      <th rowspan=\"2\" valign=\"top\">1</th>\n",
       "      <th>Green</th>\n",
       "      <td>2.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Red</th>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">2</th>\n",
       "      <th>Green</th>\n",
       "      <td>5.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Red</th>\n",
       "      <td>NaN</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"4\" valign=\"top\">b</th>\n",
       "      <th rowspan=\"2\" valign=\"top\">1</th>\n",
       "      <th>Green</th>\n",
       "      <td>8.0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Red</th>\n",
       "      <td>NaN</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">2</th>\n",
       "      <th>Green</th>\n",
       "      <td>11.0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Red</th>\n",
       "      <td>NaN</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "state            Colorado  Ohio\n",
       "key1 key2 color                \n",
       "a    1    Green       2.0     0\n",
       "          Red         NaN     1\n",
       "     2    Green       5.0     3\n",
       "          Red         NaN     4\n",
       "b    1    Green       8.0     6\n",
       "          Red         NaN     7\n",
       "     2    Green      11.0     9\n",
       "          Red         NaN    10"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "frame.stack(level=1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "|ZHESHI|BIADF|\n",
    "|---|---|\n",
    "|GDGF|DFd|"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import os\n",
    "np?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[1]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
